#include "Algorithm/Algorithm.h"
#include "Basic/Basic.h"
#include "Basic/UnitTest.h"
using namespace zl;
using namespace zl::algorithm::trietree;

TEST_CASE(TestTrieTree)
{
	ATrieTree  tree;
	tree.Add("word");
	tree.Add("world");
	tree.Add("wo");
	tree.Add("she");
	tree.Add("he");
	tree.Add("her");
    std::vector<std::string> res=tree.Search("wo");
	assert(res.size() == 3);
	assert(res[0] == "wo");
	assert(res[1] == "word");
	assert(res[2] == "world");
}
